import 'package:flutter/material.dart';

class AppBarWidget {
  static appBar(String title, GestureTapCallback? onTap, {String? rightTitle}) {
    return AppBar(
      backgroundColor: Colors.white,
      centerTitle: true,
      leading: InkWell(
        onTap: onTap,
        child: Icon(
          Icons.arrow_back_ios,
          color: Colors.black,
          size: 16,
        ),
      ),
      title: Text(
        title,
        style: TextStyle(
            color: Colors.black, fontSize: 14, fontWeight: FontWeight.bold),
      ),
      actions: <Widget>[
        Text(
          rightTitle ?? "",
          style: TextStyle(color: Colors.black, fontSize: 12),
        )
      ],
    );
  }
}
